package data;

import fields.AbstractField;
import fileProcessing.ParsingException;

public class DataMatcher {
	
	private AbstractDataType [] dataTypes = {new BankAccountNumberEntry(),new CreditCardNumberEntry(),new DateEntry(),
			new PhoneNumberEntry(),new RoutingNumberEntry(),new SSNEntry(),new UrlEntry(),new ZipCodeEntry(),new EmailEntry()}; 
	
	public String matchesData(String s) throws ParsingException{
		for(AbstractDataType adt : dataTypes){
			if(adt.isValid(s)){
				return adt.getType();
			}
		}
		return null;
	}

}
